#!/bin/bash
virtualenv -p python3 $HOME/tmp/rnnoise-venv/
source $HOME/tmp/rnnoise-venv/bin/activate
./configure
make && cd src && ./compile && cd -

./src/denoise_training dataset/rnn_far.pcm dataset/rnn_near.pcm dataset/aec_noise_far.pcm dataset/aec_noise_near.pcm 10000000 out.f32

python ./training/bin2hdf5.py out.f32 10000084 138 training.h5

python ./training/rnn_train.py training.h5

python training/dump_rnn.py final_weights.hdf5 ./src/rnn_data.c rnn_data.h orig

make clean & make
./examples/rnnoise_demo near.pcm far.pcm aec_out.pcm
